Fix xen build on NetBSD.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 30 May 2007 08:59:09 +0000 (09:59 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 30 May 2007 08:59:09 +0000 (09:59 +0100)
From: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
config/NetBSD.mk [new file with mode: 0644]
xen/arch/x86/shutdown.c
xen/tools/symbols.c

diff --git a/config/NetBSD.mk b/config/NetBSD.mk
new file mode 100644 (file)
index 0000000..b421a1c
--- /dev/null
@@ -0,0 +1 @@
+include $(XEN_ROOT)/config/StdGNU.mk
index 76dbcca5d20d7d432c3ef50e181ee27d4dc8684f..441144b830f77bc0c5b3e846148ca24cc294b2a2 100644 (file)
@@ -197,7 +197,7 @@ static void machine_real_restart(const unsigned char *code, unsigned length)
 
 #endif
 
-void machine_restart(char * __unused)
+void machine_restart(char *cmd)
 {
     int i;
 
index c21e012206f2b238cc41d1b8b3cc50ec68d1febc..76eb88b585c97d0966dec3b4c3efb0c773b871db 100644 (file)
@@ -29,6 +29,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdint.h>
 #include <ctype.h>
 
 #define KSYM_NAME_LEN          127
@@ -103,7 +104,7 @@ static int read_symbol(FILE *in, struct sym_entry *s)
                _sextratext = s->addr;
        else if (strcmp(sym, "_eextratext") == 0)
                _eextratext = s->addr;
-       else if (toupper(stype) == 'A')
+       else if (toupper((uint8_t)stype) == 'A')
        {
                /* Keep these useful absolute symbols */
                if (strcmp(sym, "__kernel_syscall_via_break") &&
@@ -113,7 +114,7 @@ static int read_symbol(FILE *in, struct sym_entry *s)
                        return -1;
 
        }
-       else if (toupper(stype) == 'U' ||
+       else if (toupper((uint8_t)stype) == 'U' ||
                 is_arm_mapping_symbol(sym))
                return -1;
        /* exclude also MIPS ELF local symbols ($L123 instead of .L123) */